<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <%--${company_name}   company_logo--%>
    <title>登录</title>
    <meta charset="utf-8">

    <!--[if lt IE 9]><script src="${resourcePath}/js/comm/css3-mediaqueries.js"></script><![endif]-->
    <script type="text/javascript" src=<c:url value ="/js/comm/jquery-1.9.0.min.js"/> ></script>
    <script type="text/javascript" src=<c:url value ="/js/comm/jquery-migrate-1.2.1.min.js"/> ></script>
    <script type="text/javascript" src=<c:url value ="/js/table/jquery.cookie.js"/> ></script>
    <script type="text/javascript" src=<c:url value ="/js/comm/jquery.blockUI.min.js"/> ></script>
    <script type="text/javascript" src=<c:url value ="/js/comm/myutil.js"/>> </script>
    <script type="text/javascript" src=<c:url value ="/js/comm/commonBase.js"/>> </script>
    <script type="text/javascript" src=<c:url value ="/js/crypjs/core-min.js"/> ></script>
    <script type="text/javascript" src=<c:url value ="/js/crypjs/aes.js"/> ></script>
    <script type="text/javascript" src=<c:url value ="/js/crypjs/login.js"/> ></script>
    <script type="text/javascript">
        var _token="";

        function login (){
            $().invoke(
                    "<%=request.getContextPath()%>/login.json",
                    $("#login").serialize(),
                    function(m,r){
                        if (r=='loginSuccess'){
                            var c=$("#checkedmeI").hasClass("active");
                            if (c){
                                setUserInfoCookies();
                            }
                            localStorage.setItem("_nowPage_url_CacheName","");
                            localStorage.setItem("_nowPage_tab_CacheName","");
                            top.location="<%=request.getContextPath()%>"+"/pipe/pipeIndex.html";
                        }
                    }
            )
        }
    </script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="${resourcePath}/css/comm/base_v3.0.css">
</head>
<body class="login-bg">
<div class="login-icon"><img src="${resourcePath}/images/comm/logo.png" alt=""/></div>
<div class="input-login">
    <p class="p-welcome"></p>
    <form id="login">
    <div class="user-input clearFix">
        <em class="em0"></em>
        <input name="userName" type="text" placeholder="请输入用户名"/>
    </div>
    <div class="user-input clearFix password active">
        <em class="em1"></em>
        <input name="pwd" type="password" placeholder="请输入密码"/>
    </div>
        </form>
    <div class="auto">
        <span  class="on-off"><em id="checkedmeI" onclick="checkedme(this)"></em><i>记住密码</i></span>
        <%--<a href="">忘记密码？</a>--%>
    </div>
    <a onclick="login()" class="lo-btn" href="javascript:void(0)"></a>
</div>
<p class="p-com">Copyright © 2015 四川德源云管道技术有限公司All Rights Reserved</p>
<div class="phone-address">
    <p class="com-phone">电话:028-6888695     邮箱:sunpeng@deyuanyun.com</p>
    <p class="com-address">公司地址：四川省成都市高新区天益街38#理想中心3栋1208</p>
</div>

</body>
<script>
    $(function(){
        $('.auto .on-off em').on('click',function(){
            $(this).hasClass('active') ? $(this).removeClass('active') : $(this).addClass('active')
        })
    });
    $(document).ready(function(){
        if(top.location!=self.location){
            top.location="<%=request.getContextPath()%>"+"/index.html";
            return;
        }
        readUserInfoCookies();
    });

    document.onkeydown=function(event){
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if(e && e.keyCode==13){ // enter 键
            login();
        }
    };
</script>
</html>